<!--
 * Afrimesh: easy management for B.A.T.M.A.N. wireless mesh networks
 * Copyright (C) 2008-2009 Meraka Institute of the CSIR
 * All rights reserved.
 *  
 * This software is licensed as free software under the terms of the
 * New BSD License. See /LICENSE for more information.
-->

<script type="text/javascript"> //<![CDATA[    
(function() {

  /** includes ------------------------------------------------------------ */


  /** construction -------------------------------------------------------- */
  ready = function() { // INJ 'ready' should be the only symbol we're exposing to the global namespace
    if ($("#live-chat iframe").length == 0) {
      $("#live-chat").append("<iframe></iframe>");
      $("#live-chat iframe").attr({
          src         : afrimesh.settings.support.irc,
          scrolling   : "no",
          frameborder : 0,
          style       : "background: lightgray;"
        });
    }
    $("#live-chat iframe").attr("width", "99%");
    $("#live-chat iframe").attr("height", "80%");
    $("#live-chat iframe").css("visibility", "visible");
    console.debug("loaded help.chat.html");
    return unload;
  };

  function unload() {
    $("#live-chat iframe").css("visibility", "hidden");
    $("#live-chat iframe").attr("width", "0%");
    $("#live-chat iframe").attr("height", "0%");
    console.debug("unloaded help.chat.html");
  };

  /** done ---------------------------------------------------------------- */
  console.debug("loaded help.chat.js");
 
})();
//]]></script>
